#include<iostream>
using namespace std;

struct job
{
	char name[20];
	int salary;
	int floor;
};

template<typename T>
void Swap(T& a, T& b);

template <> void Swap(job& a, job& b);

void show(job& a);

int main()
{
	int i = 0, j = 1;
	cout << i << " " << j << endl;
	Swap(i, j);
	cout << i << " " << j << endl;
	
	job x = {"zhangsan",114,11};
	job y = {"lisi",514,4};
	show(x);
	show(y);
	Swap(x, y);
	show(x);
	show(y);
	return 0;
}

template<typename T>
void Swap(T& a, T& b)
{
	T t = a;
	a = b;
	b = t;
}

template <> void Swap(job& a, job& b)
{
	int sal = a.salary;
	a.salary = b.salary;
	b.salary = sal;
	int flo = a.floor;
	a.floor = b.floor;
	b.floor = flo;
}

void show(job& a)
{
	cout << "name:" << a.name << endl;
	cout << "salary:" << a.salary << endl;
	cout << "floor:" << a.floor << endl;
}
